﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 系统日志表
	/// </summary>
	[Table("Sys_Log")]
	public partial class Sys_Log
	{
		/// <summary>
		/// 
		/// </summary>
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 模块代码
		/// </summary>
		[Column("ModuleID")]
		public int ModuleID { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ModuleCode")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string ModuleCode { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ModuleName")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string ModuleName { get; set; }

		/// <summary>
		/// 业务代码
		/// </summary>
		[Column("ServiceID")]
		public int ServiceID { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ServiceCode")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string ServiceCode { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ServiceName")]
		[StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
		public string ServiceName { get; set; }

		/// <summary>
		/// 功能代码
		/// </summary>
		[Column("ActionID")]
		public int ActionID { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ActionCode")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string ActionCode { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("ActionName")]
		[StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
		public string ActionName { get; set; }

		/// <summary>
		/// 原始操作链接
		/// </summary>
		[Column("SrcUrl")]
		[StringLength(200, ErrorMessage = "{0}长度不能超过{1}")]
		public string SrcUrl { get; set; }

		/// <summary>
		/// 日志类别
		/// </summary>
		[Column("LogType")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string LogType { get; set; }

		/// <summary>
		/// 日志等级
		/// </summary>
		[Column("LogLevel")]
		public int LogLevel { get; set; }

		/// <summary>
		/// 操作内容
		/// </summary>
		[Column("LogContent")]
		public string LogContent { get; set; }

		/// <summary>
		/// 记录时间
		/// </summary>
		[Column("LogTime")]
		public DateTime LogTime { get; set; }

		/// <summary>
		/// 操作员ID
		/// </summary>
		[Column("LogManID")]
		[JsonIgnore]
		public int LogManID { get; set; }

		/// <summary>
		/// 操作员
		/// </summary>
		[Column("LogManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string LogManName { get; set; }

		/// <summary>
		/// IP地址
		/// </summary>
		[Column("LogManIP")]
		[StringLength(40, ErrorMessage = "{0}长度不能超过{1}")]
		public string LogManIP { get; set; }

		[Column("OrgID")]
		[JsonIgnore]
		public int OrgID { get; set; }
	}
}
